package com.example.demo.UserController;

import com.example.demo.Model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Component
public class UserComponent {
    @Bean
    @Primary
    public Student s1(){
        return new Student("zhangsang",12);
    }
}
